package com.qf.weektest.vo;

import java.util.HashMap;
import java.util.Map;

public class ResultVo extends HashMap<String, Object> {


    public static ResultVo ok(){

        final ResultVo resultVo = new ResultVo();

        resultVo.put("name","ok");

        return resultVo;

    }

    public static ResultVo ok(String name,Integer polls){

        final ResultVo resultVo = new ResultVo();

        resultVo.put("name",name);
        resultVo.put("票数",polls);

        return resultVo;

    }
    public static ResultVo ok(String token){

        final ResultVo resultVo = new ResultVo();

        resultVo.put("msg","ok");

        resultVo.put("token",token);
        return resultVo;

    }

    public static ResultVo erro(String token){

        final ResultVo resultVo = new ResultVo();

        resultVo.put("msg","erro");

        resultVo.put("token",token);
        return resultVo;

    }

    public static ResultVo ok(Map<String, Integer> collect) {
        final ResultVo resultVo = new ResultVo();

        resultVo.put("msg","ok");

        resultVo.put("data",collect);
        return resultVo;

    }
}
